{% extends "base.html" %} {% block title %}Prescription #{{ prescription.id }} — Quick Care{% endblock %} {% set doctor_full_name = prescription.appointment.doctor.user.name %} {% set doctor_display = ('Dr. ' + doctor_full_name) if not doctor_full_name.startswith('Dr.') and not doctor_full_name.startswith('dr.') else doctor_full_name %} {% block content %}
{% if get_current_user().role == 'doctor' %} Back to Appointments {% else %} Back to Appointments {% endif %}
Quick Care
Digital Healthcare Platform
{{ doctor_display }}
{{ prescription.appointment.doctor.specialization or 'General Physician' }}
{{ prescription.appointment.doctor.user.email }}
{% if prescription.appointment.doctor.user.phone %}{{ prescription.appointment.doctor.user.phone | format_phone }}{% endif %}
Patient Name
{{ prescription.appointment.patient.user.name }}
Age / Gender
{% if prescription.appointment.patient.user.date_of_birth %} {% set dob = prescription.appointment.patient.user.date_of_birth %} {% set age = ((prescription.created_at.date() - dob).days / 365.25) | int %}{{ age }} Y {% else %}—{% endif %} / {{ prescription.appointment.patient.user.gender | title if prescription.appointment.patient.user.gender else 'N/A' }}
Date Issued
{{ prescription.created_at.strftime('%d %b %Y') }}
Rx ID
#{{ '%05d'|format(prescription.id) }}
{% if prescription.vitals_weight or prescription.vitals_bp or prescription.vitals_temp or prescription.vitals_pulse %}
Vital Signs
{% if prescription.vitals_bp %}
{{ prescription.vitals_bp }}
mmHg
Blood Pressure
{% endif %} {% if prescription.vitals_temp %}
{{ prescription.vitals_temp }}
°F
Temperature
{% endif %} {% if prescription.vitals_weight %}
{{ prescription.vitals_weight }}
kg
Weight
{% endif %} {% if prescription.vitals_pulse %}
{{ prescription.vitals_pulse }}
bpm
Pulse
{% endif %}
{% endif %} {% if prescription.chief_complaints %}
Chief Complaints
{{ prescription.chief_complaints }}
{% endif %} {% if prescription.diagnosis %}
Primary Diagnosis
Diagnosed Condition
{{ prescription.diagnosis }}
{% endif %} {% if prescription.follow_up_date %}
Follow-Up Visit
{{ prescription.follow_up_date.strftime('%b') }}
{{ prescription.follow_up_date.strftime('%d') }}
{{ prescription.follow_up_date.strftime('%Y') }}
Scheduled Return Visit
{% if prescription.follow_up_notes %}
{{ prescription.follow_up_notes }}
{% endif %}
{% endif %}
{% if prescription.medicines %}
Prescribed Medicines
{% for medicine in prescription.medicines | sort(attribute='order') %}
{{ loop.index }}
{{ medicine.medicine_name }}
{% if medicine.dosage %}{{ medicine.dosage }}{% endif %} {% if medicine.frequency %}{{ medicine.frequency }}{% endif %} {% if medicine.duration %}{{ medicine.duration }}{% endif %}
{% if medicine.instructions %}
{{ medicine.instructions }}
{% endif %}
{% endfor %}
{% endif %} {% if prescription.tests %}
Recommended Lab Tests
{% for test in prescription.tests | sort(attribute='order') %}
{{ test.test_name }}
{% if test.instructions %}
{{ test.instructions }}
{% endif %}
{% endfor %}
{% endif %} {% if prescription.advice %}
Doctor's Advice & Instructions
{{ prescription.advice }}
{% endif %} {% if not prescription.medicines and not prescription.tests and not prescription.advice %}

No medications have been added to this prescription yet.

{% endif %}
{{ doctor_display }}
Digital Signature
{% endblock %}